add docs. fix install libs. Seems finished.~
authorFélix Piédallu <felix@piedallu.me>
Thu, 23 Nov 2017 20:43:16 +0000 (21:43 +0100)
committerØyvind Kolås <pippin@gimp.org>
Sat, 16 Dec 2017 01:44:00 +0000 (02:44 +0100)
babl/meson.build
docs/graphics/meson.build [new file with mode: 0644]
docs/meson.build [new file with mode: 0644]
extensions/meson.build
meson.build

index 64bffdf1914ec23402f57f4d4fae491f1365175f..5d783ebb601c7cdfe8d877088b40020b33262f06 100644 (file)
@@ -71,6 +71,7 @@ babl_headers = [
   'babl-macros.h',
   'babl-types.h',
   'babl.h',
+  babl_version_h,
 ]
 
 install_headers(babl_headers,
@@ -84,4 +85,6 @@ babl = library('babl',
   cpp_args: [ '-DLIBDIR="' + get_option('libdir') + '"', ],
   link_with: [ babl_base, ],
   dependencies: [ math, thread, dl, ],
+  install: true,
+  version: so_version,
 )
diff --git a/docs/graphics/meson.build b/docs/graphics/meson.build
new file mode 100644 (file)
index 0000000..5b1715a
--- /dev/null
@@ -0,0 +1,30 @@
+
+graphic_files = [
+  'babl-16x16',
+  'babl-48x48',
+  'babl-a4poster',
+]
+
+graphic_files_install = [
+  files('index.html'),
+]
+
+foreach file : graphic_files
+  sizeinfo = (
+    file.contains('a4poster')
+    ? [ '-w', '256', ]
+    : []
+  )
+
+  graphic_files_install += custom_target(file,
+    input : [ file + '.svg' ],
+    output: [ file + '.png' ],
+    command: [
+      rsvg_convert,
+      sizeinfo,
+      '-o', '@OUTPUT@',
+      '@INPUT@',
+    ],
+    install: false,
+  )
+endforeach
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644 (file)
index 0000000..b1c04f6
--- /dev/null
@@ -0,0 +1,62 @@
+subdir('graphics')
+
+host    = 'pippin.gimp.org'
+location= 'public_html/babl'
+scptarget = host + ':' + location + '/'
+
+
+# The patterns used for html creation in the babl build system
+# is very small, and should probably be documented in a tutorial.
+
+index_static_html = configure_file(
+  input : 'index-static.html.in',
+  output: 'index-static.html',
+  configuration: conf,
+)
+
+index_html = custom_target('index.html',
+  input : [
+    index_static_html,
+    '../AUTHORS',
+    '../TODO',
+    '../NEWS',
+  ],
+  output: [ 'index.html', ],
+  command: [
+
+  ],
+)
+
+# push_web_root = custom_target('push_web_root',
+#   input : [
+#     index_html,
+#     index_static_html,
+#     'babl.css',
+#   ],
+#   output: [ 'push_web_root' ],
+#   command: [
+#     'scp',
+#     '@INPUT@',
+#     scptarget,
+#   ],
+# )
+# push_web_graphics = custom_target('push_web_graphics',
+#   input : [
+#     graphic_files_install,
+#   ],
+#   output: [ 'push_web_graphics' ],
+#   command: [
+#     'scp',
+#     '@INPUT@',
+#     scptarget + 'graphics/',
+#   ],
+# )
+#
+# web = custom_target('web',
+#   input: [
+#     push_web_root,
+#     push_web_graphics
+#   ],
+#   output: [],
+#   command: [],
+# )
\ No newline at end of file
index 547c059e75353a3663af8c16125f2ba5c8a186ef..bfbbcc24b000561fec25b13bbb9f5134f37cbcca 100644 (file)
@@ -33,7 +33,8 @@ foreach extension_name : extension_names
     link_with: [ babl, ],
     dependencies: [ math, thread, ],
     name_prefix: '',
-    install: false,
+    install: true,
+    install_dir: join_paths(get_option('libdir'), lib_name),
   )
 endforeach
 
index 075c8df3887bbec2d984912e7b9776add2b6ca81..6b2aa5d296ae4f98faa5118062a084841fb3bb28 100644 (file)
@@ -49,16 +49,17 @@ lt_current_minus_age = lt_current - lt_age
 
 api_version = '@0@.@1@'.format(major_version, minor_version)
 lib_version = '@0@:@1@:@2@'.format(lt_current, lt_revision, lt_age)
-lib_name    = meson.project_name() + '-' + meson.project_version()
+so_version  = '@0@.@1@.@2@'.format(lt_current_minus_age, lt_current, interface_age)
+lib_name    = meson.project_name() + '-' + api_version
 
 stability_version_number = (major_version != 0 ? minor_version : micro_version)
 stable = (stability_version_number % 2 == 0)
 
 conf.set10('BABL_UNSTABLE', not stable)
 
-conf.set_quoted('BABL_MAJOR_VERSION',    '@0@'.format(major_version))
-conf.set_quoted('BABL_MINOR_VERSION',    '@0@'.format(minor_version))
-conf.set_quoted('BABL_MICRO_VERSION',    '@0@'.format(micro_version))
+conf.set       ('BABL_MAJOR_VERSION',    '@0@'.format(major_version))
+conf.set       ('BABL_MINOR_VERSION',    '@0@'.format(minor_version))
+conf.set       ('BABL_MICRO_VERSION',    '@0@'.format(micro_version))
 conf.set_quoted('BABL_INTERFACE_AGE',    '@0@'.format(interface_age))
 conf.set_quoted('BABL_BINARY_AGE',       '@0@'.format(binary_age))
 conf.set_quoted('BABL_VERSION',          '@0@'.format(version))
@@ -69,9 +70,6 @@ conf.set_quoted('BABL_LIBRARY_VERSION',  '@0@'.format(lib_version))
 conf.set_quoted('BABL_CURRENT_MINUS_AGE','@0@'.format(lt_current_minus_age))
 conf.set_quoted('BABL_LIBRARY',          '@0@'.format(lib_name))
 
-conf.set_quoted('WEBSITE_HOST',     'pippin.gimp.org')
-conf.set_quoted('WEBSITE_LOCATION', 'public_html/babl')
-
 ################################################################################
 # Host system detection
 
@@ -252,7 +250,7 @@ subdir('extensions')
 subdir('tests')
 subdir('tools')
 if get_option('with-docs')
-  subdir('docs')
+  subdir('docs')
 endif